package uesr;

import book.BookList;
import operation.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-08-17
 * Time: 10:39
 */
public abstract  class User {
    protected String name;
    protected IOperation[] ioperations;//创建一个数组，这个数组里面存放可以进行操作的功能

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();////管理员和普通用户的菜单肯定是不一样的，所以让他们自己去重写方法。

    public void doOperation(int choice, BookList bookList){
        ioperations[choice].work(bookList);
    }
}
